package com.resign.carl.command.example1.api.impl;

import com.resign.carl.command.example1.api.Command;
import com.resign.carl.command.example1.api.Light;

/**
 * Created by carl.zhao on 2016/6/15.
 */
public class LightOnCommand implements Command {

    private Light light;

    public LightOnCommand(Light light){
        this.light = light;
    }
    @Override
    public void execute() {
        light.on();
    }

    @Override
    public void undo() {
        light.off();
    }
}
